﻿using System;
using System.Collections.Generic;
using System.Linq;

namespace EFCoreLenarn
{

    /// <summary>
    /// 一对多关系声明在一端
    /// </summary>
    public class User
    {
        public long Id { get; set; }

        public string Name { get; set; }
    }

    public class Leave
    {
        /// <summary>
        /// 主键
        /// </summary>
        public long Id { get; set; }

        /// <summary>
        /// 申请者
        /// </summary>
        public User Requester { get; set; }

        /// <summary>
        /// 审批者
        /// </summary>
        public User? Approver { get; set; }

        /// <summary>
        /// 说明
        /// </summary>
        public string Remarks { get; set; }

        /// <summary>
        /// 开始日期
        /// </summary>
        public DateTime From { get; set; }

        /// <summary>
        /// 结束日期
        /// </summary>
        public DateTime To { get; set; }

        /// <summary>
        /// 状态
        /// </summary>
        public int Status { get; set; }
    }
}
